<?php

/**
 * @author Martin Pernica
 * @copyright 2008
 */

 echo '<br /><h2><a href="index.php?p=components&name=user">Zpět</a></h2><br />';
 if(!empty($_POST['name'])){
    $query = $GLOBALS['db']->query("INSERT INTO ".$GLOBALS['db_prefix']."users_groups (name, description) VALUES('".$_POST['name']."', '".$_POST['description']."')") or die($GLOBALS['db']->error());
    $log->write(8, 'com_categories', 'NOW()', 'User created new category', $_SESSION['id']);
	$event = 'roar.alert(\'Status\', \''.USER_GROUP_ADDED.' !\');';
	array_push($Roar, $event);
 }

?>
<form action="<?php echo $_SERVER['PHP_SELF'] .'?'. $_SERVER['QUERY_STRING'] ?>" method="POST">
<table>
<tr><td><?php echo USER_GROUP_NAME; ?> :</td><td><input type="text" name="name" size="30"/></td></tr>
<tr><td><?php echo USER_GROUP_DESCRIPTION; ?>  :</td><td><input type="text" name="description" size="30"/></td></tr>
<tr><td><input type="submit" value="<?php echo SUBMIT; ?> " /></td><td></td></tr>
</table>
</form>